<template>
  <PanelBlock>
    <span style="display: flex; flex-direction: column">
<!--      <div>这是一条岗位搜索结果</div>-->
      <span style="display: flex; align-items: flex-end">
        <div class="position">{{ data.name }}</div>
        <div style="margin-left: 5px" class="secondaryInfo">{{data.salary}}</div>
      </span>
      <div class="secondaryInfo">{{ data.enterprise_name }} · {{ data.place }}</div>
    </span>
    <my-button type="light" :width="200" @click="toChat(data.admin_id)">{{ '立刻沟通: ' + data.admin_name + "经理" }}</my-button>
  </PanelBlock>
</template>

<script>
import PanelBlock from "@/components/PanelBlock.vue";
import MyButton from "@/components/common/myButton.vue";

export default {
  name: "PositionEle",
  components: {MyButton, PanelBlock},
  props: {
    data: {
      type: Object,
      default: () => ({
        id: 1,
        name: "超级工程师",
        salary: "18K-25K",
        education: "硕士",
        place: "北京海淀区学院路",
        enterprise_id: "1",
        enterprise_name: "神奇技术公司",
        enterprise_industry: "IT",
        enterprise_image_key: "https://p2.itc.cn/q_70/images03/20220826/4420c63c8fd849f1933cc21315a9b72b.jpeg",
        admin_id: 1,
        admin_name: "58Q83"
      })
    }
  },
  methods: {
    toChat(id) {
      this.$router.push({path: "/chat", query: {id: id} });
    }
  }
}
</script>

<style scoped>
.position {
  /*color: var(--color-primary);*/
  font-size: var(--font-size-large);
  font-weight: 600;
}
.secondaryInfo {
  color: grey;
  font-size: var(--font-size-small);
}
</style>